package io.xccit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.xccit.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

@Repository
public interface IUserMapper extends BaseMapper<User> {
    @MapKey("id")
    Map<String,Object> selectMapByID(Long id);

    /**
     *
     * @param page MyBatisPlus提供的分页对象,自定义分页方法时分页对象必须放在参数第一位的位置
     * @param age
     * @return
     */
    Page<User> selectUserVo(@Param("page") Page<User> page,@Param("age") Integer age);
}
